/*
* $Id: SphinxResult.java 1172 2008-02-24 13:50:48Z shodan $
*/
using System;
namespace org.sphx.api
{
	
	/// <summary> Search result set.
	/// 
	/// Includes retrieved matches array, status code and error/warning messages,
	/// query stats, and per-word stats.
	/// </summary>
	public class SphinxResult
	{
		/// <summary>Full-text field namess. </summary>
		public System.String[] fields;
		
		/// <summary>Attribute names. </summary>
		public System.String[] attrNames;
		
		/// <summary>Attribute types (refer to SPH_ATTR_xxx constants in SphinxClient). </summary>
		public int[] attrTypes;
		
		/// <summary>Retrieved matches. </summary>
		public SphinxMatch[] matches;
		
		/// <summary>Total matches in this result set. </summary>
		public int total;
		
		/// <summary>Total matches found in the index(es). </summary>
		public int totalFound;
		
		/// <summary>Elapsed time (as reported by searchd), in seconds. </summary>
		public float time;
		
		/// <summary>Per-word statistics. </summary>
		public SphinxWordInfo[] words;
		
		/// <summary>Warning message, if any. </summary>
		public System.String warning = null;
		
		/// <summary>Error message, if any. </summary>
		public System.String error = null;
		
		
		/// <summary>Query status (refer to SEARCHD_xxx constants in SphinxClient). </summary>
		private int status = - 1;
		
		
		/// <summary>Trivial constructor, initializes an empty result set. </summary>
		public SphinxResult()
		{
			this.attrNames = new System.String[0];
			this.matches = new SphinxMatch[0]; ;
			this.words = new SphinxWordInfo[0];
			this.fields = new System.String[0];
			this.attrTypes = new int[0];
		}
		
		/// <summary>Get query status. </summary>
		public virtual int getStatus()
		{
			return status;
		}
		
		/// <summary>Set query status (accessible from API package only). </summary>
		internal virtual void  setStatus(int status)
		{
			this.status = status;
		}
	}
	
	/*
	* $Id: SphinxResult.java 1172 2008-02-24 13:50:48Z shodan $
	*/
}